package com.fypg.module.medical.dal.mysql.outpatientorderguide;

import java.util.*;

import com.fypg.framework.common.pojo.PageResult;
import com.fypg.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.fypg.framework.mybatis.core.mapper.BaseMapperX;
import com.fypg.module.medical.dal.dataobject.outpatientorderguide.OutpatientOrderGuideDO;
import org.apache.ibatis.annotations.Mapper;
import com.fypg.module.medical.controller.admin.outpatientorderguide.vo.*;

/**
 * 门诊订单候诊信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface OutpatientOrderGuideMapper extends BaseMapperX<OutpatientOrderGuideDO> {

    default PageResult<OutpatientOrderGuideDO> selectPage(OutpatientOrderGuidePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OutpatientOrderGuideDO>()
                .eqIfPresent(OutpatientOrderGuideDO::getOutpatientOrderId, reqVO.getOutpatientOrderId())
                .likeIfPresent(OutpatientOrderGuideDO::getGuideName, reqVO.getGuideName())
                .eqIfPresent(OutpatientOrderGuideDO::getGuideAddress, reqVO.getGuideAddress())
                .eqIfPresent(OutpatientOrderGuideDO::getGuideNo, reqVO.getGuideNo())
                .eqIfPresent(OutpatientOrderGuideDO::getExtendData, reqVO.getExtendData())
                .eqIfPresent(OutpatientOrderGuideDO::getSortCode, reqVO.getSortCode())
                .eqIfPresent(OutpatientOrderGuideDO::getDescription, reqVO.getDescription())
                .eqIfPresent(OutpatientOrderGuideDO::getRemark, reqVO.getRemark())
                .orderByDesc(OutpatientOrderGuideDO::getId));
    }

}